<template>
<div>
     <el-form :model="ruleForm"  :label-width="$store.state.settings.mode == 'pc' ? '150px' : ''" ref="ruleForm">

                <el-form-item label='taskId' prop="taskId" v-if="false">
                <el-input v-model="ruleForm.taskId"></el-input>
                </el-form-item>
                
                <el-form-item label="净高设计值"  prop="h" 
                 :rules="{
                    required: true, message: '内容不能为空', trigger: 'blur'
                  }" >
                <el-input v-model="ruleForm.h" autocomplete="off"></el-input>
                </el-form-item>

                <el-form-item label="净开间设计值"  prop="bay" 
                  :rules="{
                    required: true, message: '内容不能为空', trigger: 'blur'
                  }">
                <el-input v-model="ruleForm.bay" autocomplete="off"></el-input>
                </el-form-item>
                
                <el-form-item label="净进深设计值"  prop="depth" 
                :rules="{
                    required: true, message: '内容不能为空', trigger: 'blur'
                  }">
                <el-input v-model="ruleForm.depth" autocomplete="off"></el-input>
                </el-form-item>

                <el-form-item label="门1设计值"  prop="door1" >
                <el-input v-model="ruleForm.door1" autocomplete="off"></el-input>
                </el-form-item>

                <el-form-item label="门2设计值"  prop="door2" >
                <el-input v-model="ruleForm.door2" autocomplete="off"></el-input>
                </el-form-item>

                <el-form-item label="窗1设计值"  prop="window1" >
                <el-input v-model="ruleForm.window1" autocomplete="off"></el-input>
                </el-form-item>

                <el-form-item label="窗2设计值"  prop="window2" >
                <el-input v-model="ruleForm.window2" autocomplete="off"></el-input>
                </el-form-item>

                <el-form-item label="窗3设计值"  prop="window3" >
                <el-input v-model="ruleForm.window3" autocomplete="off"></el-input>
                </el-form-item>

                <el-form-item > 
                <el-button type="primary" @click="submitForm('ruleForm')">立即传入</el-button>
               
                </el-form-item>
                
    </el-form>     
</div>
</template>
<script>
import msApi from "@/api/msApi";

export default {
    name: 'FormDesign',
     props: {
        taskId: {type: String,default: ''}, 
     },
    data() {
        return {
              ruleForm: {
              h: '',
              bay:'',
              depth:'',
              taskId: '',
              door1:'',
              door2:'',
              window1:'',
              window2:'',
              window3:'',
            },
        }
    },
    mounted() {
        this.ruleForm.taskId = this.taskId
    },
    methods: {
      loadTaskId(){
      },

      async submitForm(formName) {
         try {
            // const res = await msApi.submitRules(row.task_id)
            console.log(this.ruleForm)
            this.$message.success("传入成功");
            }catch (err) {
              console.log(err);
              this.$message.error('网络异常')
            }       
        // alert(2)
     }

    }
      
}
</script>
